package cn.imvc.app.models;

import java.util.List;

import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Article;
import cn.imvc.data.domain.ViewRequest;

public interface ArticleModel {

	Page<Article> find(ViewRequest viewRequest);

	Article get(int id);

	Article save(Article entity);

	Article update(Article entity);

	void delete(int id);

	void deleteBatch(int[] ids);

	Page<Article> findArticleListByArticleClass(Integer articleClassId, Integer page, Integer pageSize);
	
	public List<Object[]> findMaxId();
	
	Article findByTitleAndArticleClass(String title, Integer articleClassId);

}